package PMIRPConstDefs;

/**
 * Generated from IDL union "Schedule".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class Schedule
	implements org.omg.CORBA.portable.IDLEntity
{
	private PMIRPConstDefs.ScheduleType discriminator;
	private PMIRPConstDefs.IntervalOfDay[] daily_scheduling;
	private PMIRPConstDefs.WeeklySchedulingElement[] weekly_scheduling;

	public Schedule ()
	{
	}

	public PMIRPConstDefs.ScheduleType discriminator ()
	{
		return discriminator;
	}

	public PMIRPConstDefs.IntervalOfDay[] daily_scheduling ()
	{
		if (discriminator != PMIRPConstDefs.ScheduleType.DAILY)
			throw new org.omg.CORBA.BAD_OPERATION();
		return daily_scheduling;
	}

	public void daily_scheduling (PMIRPConstDefs.IntervalOfDay[] _x)
	{
		discriminator = PMIRPConstDefs.ScheduleType.DAILY;
		daily_scheduling = _x;
	}

	public PMIRPConstDefs.WeeklySchedulingElement[] weekly_scheduling ()
	{
		if (discriminator != PMIRPConstDefs.ScheduleType.WEEKLY)
			throw new org.omg.CORBA.BAD_OPERATION();
		return weekly_scheduling;
	}

	public void weekly_scheduling (PMIRPConstDefs.WeeklySchedulingElement[] _x)
	{
		discriminator = PMIRPConstDefs.ScheduleType.WEEKLY;
		weekly_scheduling = _x;
	}

}
